﻿<html lang="">
<head>
	<meta charset="utf-8">
	<title>Retina Dashboard</title>
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="robots" content="" />
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" href="/static/css/style.css" media="all" />
	<!--[if IE]><link rel="stylesheet" href="/static/css/ie.css" media="all" /><![endif]-->
	<!--[if lt IE 9]><link rel="stylesheet" href="/static/css/lt-ie-9.css" media="all" /><![endif]-->
    <script src="/static/js/jquery-1.6.1.min.js"></script>
    <!--<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>-->
    <script src="/static/js/jquery.wysiwyg.js"></script>
    <script src="/static/js/jquery.checkbox.min.js"></script>

    <script src="/static/js/jquery.tablesorter.min.js"></script>
    <script src="/static/js/highcharts.js"></script>
</head>
<body>
<div class="testing">
<header class="main">
	<h1><strong>Retina</strong> Dashboard</h1>
	<!--<input type="text" value="search" />-->
</header>
<section class="user">
	<div class="profile-img">
		<p><img src="/static/images/uiface2.png" alt="" height="40" width="40" /> Welcome back John Doe</p>
	</div>
	<div class="buttons">
		<!--<button class="ico-font">&#9206;</button>-->
		<!--<span class="button dropdown">-->
			<!--<ul class="notice">-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1>You have a new task</h1>-->
						<!--<h2>Report web statistics week by week.</h2> -->
					<!--</hgroup>-->
					<!--<p><span>14:24</span></p>-->
				<!--</li>-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1>New comment</h1>-->
						<!--<h2>Comment on <em>About page</em> by Darren.</h2> -->
					<!--</hgroup>-->
					<!--<p><span>11:04</span></p>-->
				<!--</li>-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1>Broken link</h1>-->
						<!--<h2>We've spotted a broken link on the <em>Blog page</em>.</h2> -->
					<!--</hgroup>-->
					<!--<p><span>10:46</span></p>-->
				<!--</li>-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1>User report</h1>-->
						<!--<h2><em>Lee Grant</em> has been promoted to admin.</h2> -->
					<!--</hgroup>-->
					<!--<p><span>09:57</span></p>-->
				<!--</li>-->
			<!--</ul>-->
		<!--</span> -->
		<!--<span class="button dropdown">-->
			<!--<a href="#">Inbox <span class="pip">6</span></a>-->
			<!--<ul class="notice">-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1>Hi, I need a favour</h1>-->
						<!--<h2>John Doe</h2>-->
						<!--<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>-->
					<!--</hgroup>-->
					<!--<p><span>11:24</span></p>-->
				<!--</li>-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1><span class="icon">&#59154;</span>Hi, I need a favour</h1>-->
						<!--<h2>John Doe</h2>-->
						<!--<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>-->
					<!--</hgroup>-->
					<!--<p><span>11:24</span></p>-->
				<!--</li>-->
				<!--<li>-->
					<!--<hgroup>-->
						<!--<h1><span class="icon">&#59154;</span>Hi, I need a favour</h1>-->
						<!--<h2>John Doe</h2>-->
						<!--<h3>Lorem ipsum dolor sit amet, consectetuer sed aidping putamus delo de sit felume...</h3>-->
					<!--</hgroup>-->
					<!--<p><span>11:24</span></p>-->
				<!--</li>-->
			<!--</ul>-->
		<!--</span> -->
		<!--<span class="button">Live</span>-->
		<!--<span class="button">Help</span>-->
		<span class="button blue"><a href="/admin/login_out/{{.tel}}">登出</a></span>
	</div>
</section>
</div>
<nav>
	<ul>
		<li class="section"><a href="/admin/index/{{.tel}}"><span class="icon">&#128711;</span> 设备监控</a></li>
		<li><a href=/admin/admin_list/{{.tel}}><span class="icon">&#128101;</span> 管理员 <span class="pip">3</span></a></li>
		<li>
			<a href="/admin/sys_setting/{{.tel}}"><span class="icon">&#9881;</span>系统设置</a>
		</li>
        <li>
            <a href="/admin/show_remote_list/{{.tel}}"><span class="icon">&#9881;</span>显示遥控数据</a>
        </li>
        <li>
            <a href="/admin/add_remote_data/{{.tel}}"><span class="icon">&#9881;</span>添加遥控数据</a>
        </li>
	</ul>
</nav>


<section class="topcontent">
	<section class="widget">
		<header>
			<span class="icon">&#128200;</span>
			<hgroup>
				<h1>Website Statistics</h1>
				<h2>An insiders view</h2>
			</hgroup>
			<aside>
				<button class="left-btn">&#59229;</button><button class="right-btn">&#59230;</button>
			</aside>
		</header>
        <div id="container" style="width:100%; height:400px;"></div>
    </section>
</section>

<!--<script type="text/javascript">-->
<!--// Feature slider for graphs-->
<!--$('.cycle').cycle({-->
	<!--fx: "scrollHorz",-->
	<!--timeout: 0,-->
    <!--slideResize: 0,-->
    <!--prev:    '.left-btn', -->
    <!--next:    '.right-btn'-->
<!--});-->
<!--</script>-->
<script type="text/javascript">

$(function () {
	    var options = {
        chart: {
            renderTo: 'container',
            type: 'spline'
        },
        series: [{data:[]}]
    };
function  getData(){//window.location.host
    	$.getJSON('http://devices.coffee-time.cn:8080/admin/api/online_devices/{{.tel}}', function(data) {
			//alert(data.length)
        		options.series[0].data.push(data.length);
	
        	var chart = new Highcharts.Chart(options);
    	});
	};
$(document).ready(function() {

	getData()
	var interval = setInterval(getData, 1000);
	//this.everyTime('1s',getData);
	

});
    });
 </script>
</body>
</html>